package com.sisyphe.android.srouter.app

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.ui.Modifier
import com.sisyphe.android.srouter.app.ui.theme.SRouterTheme
import com.sisyphe.android.srouter.facade.annotation.Route
import com.sisyphe.android.srouter.spi.b.LoginInvoke

//@Route(path = "/app/mainActivity", name = "首页")
class MainActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            SRouterTheme {
                // A surface container using the 'background' color from the theme
                Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
                    Box(modifier = Modifier.fillMaxSize()) {
                        Button(onClick = {
                            LoginInvoke().login()
                        }) {
                            Text(text = "调用登录")
                        }
                    }
                }
            }
        }
    }
}